<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" href="./Public/Admin/Bootstrap/Css/bootstrap.min.css" />
	<link rel="stylesheet" href="./Public/Admin/Uploadify/uploadify.css" />
	<link rel="stylesheet" href="./Public/Admin/Css/common.css" />
	<script type="text/javascript" src='./Public/Admin/Js/jquery-1.7.2.min.js'></script>
	<script type="text/javascript" src='./Public/Admin/Uploadify/jquery.uploadify.js'></script>
	<style type="text/css">
	    .uploadify-button {
	        background-color: transparent;
	        border: none;
	        padding: 0;
	    }
	    .uploadify:hover .uploadify-button {
	        background-color: transparent;
	    }
	</style> 
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<form action="" method='post' enctype="multipart/form-data">
		<fieldset>
		<legend>编辑商品品牌</legend>
		<table class="table table-bordered table-hover">
			<tr class="info">
				<td>品牌名称</td>
				<td colspan="2">
					<input type="text" name='bname' value="<?php echo $olddata['bname']?>" />
				</td>
			</tr>
			<script type="text/javascript">
			$(function(){
				//点击关闭图片按钮
				$('.close_img').click(function(){
					//删除图片元素
					var str = '<label for="exampleInputEmail1">缩略图</label><input id="exampleInputEmail1" type="file" name="thumb">';
					$('#upload_box').html(str);
				})
			})
		</script>
			
			
			<tr class="info">
				
				<td>品牌LOGO</td>
				<?php if ($olddata['logo']) {?>
				<td id="upload_box">
					<img src="<?php echo $olddata['logo']?>" />
				<a href="javascript:;" class="close_img">X</a>
				<input type="hidden" name="logo" value="<?php echo $olddata['logo']?>"/>
				
				</td>
				<?php }else{ ?>
				<td>
					<label for="exampleInputEmail1">缩略图</label><input id="exampleInputEmail1" type="file" name="logo">
				</td>
				<?php } ?>
			</tr>
			<tr class="info">
				<td>是否热门</td>
				<td colspan="2">
					<!--这是原生写法-->
					<?php if(1==$olddata['ishot']){ ?>
						<input type="radio" name='ishot' value='1' checked="checked"/>是
						<input type="radio" name='ishot' value='0' />否
					<?php }else{ ?>
						<input type="radio" name='ishot' value='1' />是
						<input type="radio" name='ishot' value='0' checked="checked" />否
						<?php } ?>
					<!--这是hdphp框架里的写法-->
					<!--<?php if($olddata['ishot']==1){?>
                <input type="checkbox" name='ishot' value='1' checked="checked"/>
					<?php }else{?><input type="checkbox" name='ishot' value='0'/>
					
               <?php }?>-->
				</td>
			</tr>
			<tr>
				<td colspan='3' align='center'>
					<!--模型中间编辑方法调用隐藏于里的bid-->
					<input type="hidden" name="bid" id="bid" value="<?php echo $_GET['bid']?>" />
					<input type="submit" class="btn btn-primary" value="修改品牌" />
				</td>
			</tr>
		</table>
		</fieldset>
	</form>

	</div>
	</div>
	</div>

<script type="text/javascript">
	
</script>
</body>
</html>